<template>
    <div>
        <van-radio style="margin-bottom: 10px" v-bind="$attrs" v-on="$listeners">
            <span @click="managerKeywords" style="margin-left:5px;">
                <slot></slot>
            </span>
        </van-radio>

        <com-keyword-popup :key-name="keyName" v-model="show" :key-id="keyId" :prop-name="propName"
            prop-type="radio"></com-keyword-popup>
    </div>
</template>
<script>
import loginType from './loginType';
import comKeywordPopup from './comKeywordPopup.vue';
export default {
    name: 'comRadio',
    components: {
        comKeywordPopup
    },
    props: {
        propName: String,
        keyId: String,
        keyName: String,
        canClick: {
            type: Boolean,
            default: true
        }
    },
    data() {
        return {
            show: false
        }
    },
    methods: {
        managerKeywords() {

            if (this.canClick && loginType.isPrivateLogin()) {
                //alert("");
                this.show = true;
                event.stopPropagation();
            }
        }
    }
}
</script>
<style scoped></style>